package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DailishangMapper;
import com.ruoyi.system.domain.Dailishang;
import com.ruoyi.system.service.IDailishangService;
import com.ruoyi.common.support.Convert;

/**
 * 代理商 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
@Service
public class DailishangServiceImpl implements IDailishangService 
{
	@Autowired
	private DailishangMapper dailishangMapper;

	/**
     * 查询代理商信息
     * 
     * @param dailishangId 代理商ID
     * @return 代理商信息
     */
    @Override
	public Dailishang selectDailishangById(Integer dailishangId)
	{
	    return dailishangMapper.selectDailishangById(dailishangId);
	}
	
	/**
     * 查询代理商列表
     * 
     * @param dailishang 代理商信息
     * @return 代理商集合
     */
	@Override
	public List<Dailishang> selectDailishangList(Dailishang dailishang)
	{
	    return dailishangMapper.selectDailishangList(dailishang);
	}
	
    /**
     * 新增代理商
     * 
     * @param dailishang 代理商信息
     * @return 结果
     */
	@Override
	public int insertDailishang(Dailishang dailishang)
	{
	    return dailishangMapper.insertDailishang(dailishang);
	}
	
	/**
     * 修改代理商
     * 
     * @param dailishang 代理商信息
     * @return 结果
     */
	@Override
	public int updateDailishang(Dailishang dailishang)
	{
	    return dailishangMapper.updateDailishang(dailishang);
	}

	/**
     * 删除代理商对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDailishangByIds(String ids)
	{
		return dailishangMapper.deleteDailishangByIds(Convert.toStrArray(ids));
	}
	
}
